#ifndef QUIRREL_FUNCTION_EXTENSION_HPP
#define QUIRREL_FUNCTION_EXTENSION_HPP

#include "scripting/scripting_api.h"

#include <string>
#include <string_view>

struct QuirrelFunctionExtensionPrivate;
class QuirrelFunctionExtension final : public IFunctionalScript
{
public:
    QuirrelFunctionExtension(std::string title, std::string script_path);
    ~QuirrelFunctionExtension();
    void execute() override;
    static IScript* create(std::string title, std::string path, std::string_view code);
private:
    bool compile(const std::string_view& code) const;

    QuirrelFunctionExtensionPrivate* const d;
};

#endif /* QUIRREL_FUNCTION_EXTENSION_HPP */
